var common = new Vue({
	el:'#common',
	//通用计算属性
	computed:{
		  samplinguserformat(){
			  return function(obj){
				  var result = ""
				  for(var i =0;i<obj.length;i++){
					  result+=obj[i].Name+","
				  }
				  return result
			  }
		  },
		  currenttime(){
			  var time = new Date()
			  return time.getFullYear() +"-"+(time.getMonth()+1)+"-"+time.getDate()
		  },
		sampformat(){
			return function(arr){
				var str = "[共"+arr.length+"项]"
				arr.forEach(function(item,index){
					str+=item.MonitemName+","
				})
				return str
			}
		},
		mons_sele_search(){
			return function(key_right){
				var _mons_sele_search=[]
				if(key_right){
					vueData.mons_sele.forEach(function(item,index){
						if(item.Name.includes(key_right)){
							_mons_sele_search.push(item)
						}
					})
					console.log(1)
				}else{
					_mons_sele_search = vueData.mons_sele
					console.log(vueData.mons_sele)
				}
				return _mons_sele_search
			}
		},
		GetMonStandId(monId){
			
		},
		mons_sele_search(){
			return function(key_right){
				var _mons_sele_search=[]
				if(key_right){
					this.mons_sele.forEach(function(item,index){
						if(item.Name.includes(key_right)){
							_mons_sele_search.push(item)
						}
					})
				}else{
					_mons_sele_search = example.mons_sele
				}
				return _mons_sele_search
			}
		},
		IteamForServer(){
			return function(text){
				console.log(text);
				return example.requestpath+text;
			}
		}
	}
})